#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QMainWindow>

#define flag 1

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    if(flag == 0){
        QPushButton *button = new QPushButton(this);
        QIcon icon("D:\\Coder\\pictures\\icons\\camera");
        button->move(100, 100);
        button->setIcon(icon);
    }else if(flag == 1){
        QMainWindow *window = new QMainWindow(this);
        QIcon icon("D:\\Coder\\pictures\\icons\\camera");
        window->setWindowIcon(icon);
        window->show();
    }else if(flag == 2){
        QIcon icon(":/dislike-two.png");
        this->setWindowIcon(icon);
    }


}

Widget::~Widget()
{
    delete ui;
}

